package com.origin.file.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.origin.file.entity.domain.StorageBean;

/**
 * @author MAC
 */
public interface IStorageService extends IService<StorageBean> {

    Long getTotalStorageSize(String userId);

    /**
     * 检查用户空间是否充足
     *
     * @param userId   用户 id
     * @param fileSize 要存的文件大小
     * @return true - 充足; false - 不足
     */
    boolean checkStorage(String userId, Long fileSize);

}
